<?php

$to = "";
$subject = "";
$message = "";

include_once ("httpsqs_client.php");
$httpsqs_host = "localhost";
$httpsqs_port = "1218";
$httpsqs_auth = "";
$httpsqs_charset = "utf-8";
$httpsqs = new httpsqs($httpsqs_host, $httpsqs_port, $httpsqs_auth, $httpsqs_charset);

while (1) {
	$result = $httpsqs->get("c_php_mail");
	echo $result;
	if ($result != "HTTPSQS_GET_END" && $data != "HTTPSQS_ERROR") {
		$arr = explode("&",$result);
		print_r($arr);
		$from = "test@bytewalla.com";
		$headers = "From: $from";
		mail($arr[0],$arr[1],$arr[2],$headers);
		//echo $to.$from.$msg;
	}else{
		sleep(1);
	}
}


?>
